{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "id": "67222FB6440C4F3CAE347A5A6BCD1317",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import lightgbm as lgb\n",
    "import jieba\n",
    "import numpy as np\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "from sklearn.feature_extraction.text import TfidfVectorizer\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "0CC4354CA19D47F0978342FDFC9470B2",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "source": [
    "## 加载数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "id": "B2C07D96849B457F899BB79D446771A0",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "train=pd.read_csv('train.csv')\n",
    "test=pd.read_csv('test.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false,
    "id": "4958065B2CAF49C78167E73CBE7F56D2",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tweet_id</th>\n",
       "      <th>content</th>\n",
       "      <th>label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>tweet_0</td>\n",
       "      <td>@tiffanylue i know  i was listenin to bad habi...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>tweet_1</td>\n",
       "      <td>Layin n bed with a headache  ughhhh...waitin o...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>tweet_2</td>\n",
       "      <td>Funeral ceremony...gloomy friday...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>tweet_3</td>\n",
       "      <td>wants to hang out with friends SOON!</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>tweet_4</td>\n",
       "      <td>@dannycastillo We want to trade with someone w...</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  tweet_id                                            content  label\n",
       "0  tweet_0  @tiffanylue i know  i was listenin to bad habi...      0\n",
       "1  tweet_1  Layin n bed with a headache  ughhhh...waitin o...      1\n",
       "2  tweet_2                Funeral ceremony...gloomy friday...      1\n",
       "3  tweet_3               wants to hang out with friends SOON!      2\n",
       "4  tweet_4  @dannycastillo We want to trade with someone w...      3"
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false,
    "id": "972DD9CB90E8471283E08E5C4E07D204",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tweet_id</th>\n",
       "      <th>content</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>tweet_0</td>\n",
       "      <td>Re-pinging @ghostridah14: why didn't you go to...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>tweet_1</td>\n",
       "      <td>@kelcouch I'm sorry  at least it's Friday?</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>tweet_2</td>\n",
       "      <td>The storm is here and the electricity is gone</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>tweet_3</td>\n",
       "      <td>So sleepy again and it's not even that late. I...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>tweet_4</td>\n",
       "      <td>Wondering why I'm awake at 7am,writing a new s...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  tweet_id                                            content\n",
       "0  tweet_0  Re-pinging @ghostridah14: why didn't you go to...\n",
       "1  tweet_1         @kelcouch I'm sorry  at least it's Friday?\n",
       "2  tweet_2      The storm is here and the electricity is gone\n",
       "3  tweet_3  So sleepy again and it's not even that late. I...\n",
       "4  tweet_4  Wondering why I'm awake at 7am,writing a new s..."
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false,
    "id": "479430B7D6064E798E2D6F049794D03C",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "## train"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "E31D6CCCA6F042EE810249C3E0173B53",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "source": [
    "## 思路1 文本分类  \n",
    "\n",
    "基于文本的分类模型  \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false,
    "id": "9AE1ED594D1047138C093A2E92747566",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "vec = TfidfVectorizer(max_features=80000, ngram_range=(1, 2),\n",
    "                              min_df=2, max_df=0.96,\n",
    "                              strip_accents='unicode',\n",
    "                              norm='l2',\n",
    "                              token_pattern=r\"(?u)\\b\\w+\\b\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false,
    "id": "BB93626B832C41D785BE21523DD50611",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "TfidfVectorizer(analyzer='word', binary=False, decode_error='strict',\n",
       "                dtype=<class 'numpy.float64'>, encoding='utf-8',\n",
       "                input='content', lowercase=True, max_df=0.96,\n",
       "                max_features=80000, min_df=2, ngram_range=(1, 2), norm='l2',\n",
       "                preprocessor=None, smooth_idf=True, stop_words=None,\n",
       "                strip_accents='unicode', sublinear_tf=False,\n",
       "                token_pattern='(?u)\\\\b\\\\w+\\\\b', tokenizer=None, use_idf=True,\n",
       "                vocabulary=None)"
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vec.fit(pd.concat([train['content'],\n",
    "                   test['content']],\n",
    "                  axis=0))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false,
    "id": "6B3358A15A7543D996AE075A4E0DF21C",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(30000, 57594)"
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train=vec.transform(train['content'])\n",
    "X_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false,
    "id": "5B9307D7CB94422A99638F4619794E86",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10000, 57594)"
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_test=vec.transform(test['content'])\n",
    "X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false,
    "id": "063F835B44DB404FBA5A9B83F564FD99",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0         0\n",
       "1         1\n",
       "2         1\n",
       "3         2\n",
       "4         3\n",
       "5         1\n",
       "6         4\n",
       "7         1\n",
       "8         3\n",
       "9         4\n",
       "10        1\n",
       "11        1\n",
       "12        5\n",
       "13        6\n",
       "14        4\n",
       "15        1\n",
       "16        4\n",
       "17        3\n",
       "18        4\n",
       "19        1\n",
       "20        4\n",
       "21        1\n",
       "22        4\n",
       "23        3\n",
       "24        3\n",
       "25        3\n",
       "26        3\n",
       "27        1\n",
       "28        4\n",
       "29        3\n",
       "         ..\n",
       "29970    11\n",
       "29971     6\n",
       "29972     9\n",
       "29973     9\n",
       "29974     1\n",
       "29975     9\n",
       "29976     9\n",
       "29977     6\n",
       "29978     2\n",
       "29979     9\n",
       "29980     7\n",
       "29981     6\n",
       "29982     0\n",
       "29983     5\n",
       "29984     4\n",
       "29985     9\n",
       "29986     9\n",
       "29987     3\n",
       "29988     3\n",
       "29989     5\n",
       "29990     9\n",
       "29991     9\n",
       "29992     9\n",
       "29993     9\n",
       "29994     6\n",
       "29995     3\n",
       "29996     3\n",
       "29997     3\n",
       "29998     6\n",
       "29999     9\n",
       "Name: label, Length: 30000, dtype: int64"
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train=train['label'].astype(int)\n",
    "y_train"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "E9A57235BEF34654BB87F0D5D1767E38",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "source": [
    "## 训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false,
    "id": "5CD643AEDDC847958BF6FD589A1309B7",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "fold n°1\n",
      "Training until validation scores don't improve for 100 rounds.\n",
      "[100]\ttraining's multi_logloss: 1.83451\tvalid_1's multi_logloss: 2.04899\n",
      "[200]\ttraining's multi_logloss: 1.67476\tvalid_1's multi_logloss: 2.02627\n",
      "[300]\ttraining's multi_logloss: 1.55731\tvalid_1's multi_logloss: 2.02127\n",
      "[400]\ttraining's multi_logloss: 1.4639\tvalid_1's multi_logloss: 2.02239\n",
      "Early stopping, best iteration is:\n",
      "[329]\ttraining's multi_logloss: 1.52832\tvalid_1's multi_logloss: 2.0211\n",
      "fold n°2\n",
      "Training until validation scores don't improve for 100 rounds.\n",
      "[100]\ttraining's multi_logloss: 1.85081\tvalid_1's multi_logloss: 2.0036\n",
      "[200]\ttraining's multi_logloss: 1.69844\tvalid_1's multi_logloss: 1.95736\n",
      "[300]\ttraining's multi_logloss: 1.58473\tvalid_1's multi_logloss: 1.93713\n",
      "[400]\ttraining's multi_logloss: 1.49242\tvalid_1's multi_logloss: 1.92852\n",
      "[500]\ttraining's multi_logloss: 1.41511\tvalid_1's multi_logloss: 1.92603\n",
      "Early stopping, best iteration is:\n",
      "[485]\ttraining's multi_logloss: 1.42598\tvalid_1's multi_logloss: 1.92592\n",
      "fold n°3\n",
      "Training until validation scores don't improve for 100 rounds.\n",
      "[100]\ttraining's multi_logloss: 1.86029\tvalid_1's multi_logloss: 1.98132\n",
      "[200]\ttraining's multi_logloss: 1.70914\tvalid_1's multi_logloss: 1.92296\n",
      "[300]\ttraining's multi_logloss: 1.59637\tvalid_1's multi_logloss: 1.89586\n",
      "[400]\ttraining's multi_logloss: 1.50442\tvalid_1's multi_logloss: 1.88234\n",
      "[500]\ttraining's multi_logloss: 1.42686\tvalid_1's multi_logloss: 1.87619\n",
      "[600]\ttraining's multi_logloss: 1.3601\tvalid_1's multi_logloss: 1.87523\n",
      "Early stopping, best iteration is:\n",
      "[588]\ttraining's multi_logloss: 1.36755\tvalid_1's multi_logloss: 1.87516\n",
      "fold n°4\n",
      "Training until validation scores don't improve for 100 rounds.\n",
      "[100]\ttraining's multi_logloss: 1.85563\tvalid_1's multi_logloss: 1.98288\n",
      "[200]\ttraining's multi_logloss: 1.70335\tvalid_1's multi_logloss: 1.92892\n",
      "[300]\ttraining's multi_logloss: 1.59062\tvalid_1's multi_logloss: 1.9037\n",
      "[400]\ttraining's multi_logloss: 1.49887\tvalid_1's multi_logloss: 1.89051\n",
      "[500]\ttraining's multi_logloss: 1.42175\tvalid_1's multi_logloss: 1.88473\n",
      "[600]\ttraining's multi_logloss: 1.35561\tvalid_1's multi_logloss: 1.8832\n",
      "[700]\ttraining's multi_logloss: 1.29759\tvalid_1's multi_logloss: 1.88448\n",
      "Early stopping, best iteration is:\n",
      "[615]\ttraining's multi_logloss: 1.34651\tvalid_1's multi_logloss: 1.88308\n",
      "fold n°5\n",
      "Training until validation scores don't improve for 100 rounds.\n",
      "[100]\ttraining's multi_logloss: 1.84113\tvalid_1's multi_logloss: 2.01709\n",
      "[200]\ttraining's multi_logloss: 1.68282\tvalid_1's multi_logloss: 1.99048\n",
      "[300]\ttraining's multi_logloss: 1.56474\tvalid_1's multi_logloss: 1.98623\n",
      "Early stopping, best iteration is:\n",
      "[287]\ttraining's multi_logloss: 1.57863\tvalid_1's multi_logloss: 1.9859\n",
      "CPU times: user 1h 22min 35s, sys: 9.5 s, total: 1h 22min 44s\n",
      "Wall time: 10min 23s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "params = {\n",
    "          \"objective\" : \"multiclass\",\n",
    "          \"num_class\" : 13,\n",
    "          \"num_leaves\" : 60,\n",
    "          \"max_depth\": -1,\n",
    "          \"learning_rate\" : 0.01,\n",
    "          \"bagging_fraction\" : 0.9,  # subsample\n",
    "          \"feature_fraction\" : 0.9,  # colsample_bytree\n",
    "          \"bagging_freq\" : 5,        # subsample_freq\n",
    "          \"bagging_seed\" : 2018,\n",
    "          \"verbosity\" : -1,\n",
    "          'num_threads':8,# 进程数 根据机器资源调整\n",
    "}\n",
    "\n",
    " \n",
    "# 五折交叉验证\n",
    "folds = StratifiedKFold(n_splits=5, shuffle=False, random_state=2019)\n",
    "oof = np.zeros([len(train),13])\n",
    "predictions = np.zeros([len(test),13])\n",
    " \n",
    "for fold_, (trn_idx, val_idx) in enumerate(folds.split(X_train, y_train)):\n",
    "    print(\"fold n°{}\".format(fold_+1))\n",
    "    trn_data = lgb.Dataset(X_train[trn_idx], y_train[trn_idx])\n",
    "    val_data = lgb.Dataset(X_train[val_idx], y_train[val_idx])\n",
    " \n",
    "    num_round = 1000\n",
    "    clf = lgb.train(params, \n",
    "                    trn_data, \n",
    "                    num_round, \n",
    "                    valid_sets = [trn_data, val_data], \n",
    "                    verbose_eval = 100, \n",
    "                    early_stopping_rounds = 100)\n",
    "    oof[val_idx] = clf.predict(X_train[val_idx], num_iteration=clf.best_iteration)    \n",
    "    predictions += clf.predict(X_test, num_iteration=clf.best_iteration) / folds.n_splits\n",
    "    #print(predictions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false,
    "id": "581A2A724F0E43EC8DC2584B9C884D7A",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  tweet_id  label\n",
      "0  tweet_0      4\n",
      "1  tweet_1      4\n",
      "2  tweet_2      3\n",
      "3  tweet_3      4\n",
      "4  tweet_4      4\n"
     ]
    }
   ],
   "source": [
    "predicted_df = pd.DataFrame({'label': predicted_labels})\n",
    "sub = pd.concat([test.iloc[:,0], predicted_df], axis=1)\n",
    "print(sub.head())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false,
    "id": "A117F4CFE99241A0BEF227F0F035E6D0",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "from sklearn.metrics import accuracy_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false,
    "id": "72CC1FDF6C1144F2A0B9DB3806CF2FEB",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.3416666666666667"
      ]
     },
     "execution_count": null,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "accuracy_score(y_train, np.argmax(oof,axis=1))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "CB3B12A1E98F4F9A9C6F01A510B22078",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "source": [
    "## 提交结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false,
    "id": "DC35D26833DF4CEC9EAEE6C95D60E47D",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "sub.to_csv('sub.csv',index=None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "D4FCC15299984F2B80007C15065BD71B",
    "jupyter": {},
    "notebookId": "68ac01ff08d9fbd9f0166001",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "source": [
    "## 提升思路  \n",
    "- 使用一些深度学习模型，例如word2vec+rnn/lstm对于文本进行分类  \n",
    "- 利用预训练模型进行训练和学习"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
